<style>
.setimg{
	margin:-2px 5px 0 0 
}
#addform .file{
	position: relative;
}
#addform .file span{
	position: absolute;
	right: 80px;
	top: 15px;
	background-color: #414959;
	padding: 2px 6px;
	height: 23px;
	line-height: 23px;
	cursor: pointer;
	color: #fff;
	font-size: 14px;
	overflow: hidden;
	background-image: linear-gradient(to bottom, #6c7994, #414959);
	border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
	border: 1px solid #363d4a;
	display: inline-block;
	*display: inline;
	*zoom: 1;
}
#addform .file span input{
	position: absolute;
	font-size: 100px;
	left: 0;
	top: 0;
	opacity: 0;
	filter: alpha(opacity=0);
	cursor: pointer;
}
</style>
<div class="row-fluid">
	<a style="border:1px solid #ccc" class="block-heading" data-toggle="collapse">列表数据</a>
    <div class="well">
		 <button class="btn btn-primary ifrm" data-url="/project/addPro" data-width="820" data-height="650" data-title="添加套餐" data-params="" style="float:right;padding:3px 6px">添加套餐</button>
	    <div class="btn-toolbar">
		    <form>
		    	<input class="input input-medium" type="text" name="project_name" value="<?=I('get.project_name')?>" style="width: 150px;text-align: center" placeholder="套餐名称"/>
				<select name="project_status" style="margin-left: 10px;width: 130px;">
					<option value="0">套餐状态/所有</option>
					<option value="1" <?=I('get.project_status')==1?'selected':''?>>已下架</option>
					<option value="2" <?=I('get.project_status')==2?'selected':''?>>上架中</option>
				</select>
				<select name="score_type" style="margin-left: 10px;width: 180px;">
					<option value="0">购买所需积分类型/所有</option>
					<option value="1" <?=I('get.score_type')==1?'selected':''?>>普通积分</option>
					<option value="2" <?=I('get.score_type')==2?'selected':''?>>白金积分</option>
					<option value="3" <?=I('get.score_type')==3?'selected':''?>>钻石积分</option>
					<option value="4" <?=I('get.score_type')==4?'selected':''?>>体验积分</option>
					<option value="5" <?=I('get.score_type')==5?'selected':''?>>黄金积分</option>
					<option value="6" <?=I('get.score_type')==5?'selected':''?>>口腔积分</option>
				</select>
		    	<input type="hidden" value="<?=I('get.res')?>" name="res" />
		    	<button class="btn btn-info" style="margin:-9px 0 0 15px"><i class="icon-search"></i> 搜索</button>
		    </form>

		</div>
		<hr>
<?php
	$type = ['','普通积分','白金积分','钻石积分','体验积分','黄金积分','口腔积分'];
?>

		<table class="table">
		      <thead>
		        <tr>
		            <th style="text-align:center;">编号</th>
		            <th style="text-align:center;">套餐名称</th>
		            <th style="text-align:center;">套餐图片</th>
		            <th style="text-align:center;">套餐介绍</th>
					<th style="text-align:center;">购买所需积分类型</th>
					<th style="text-align:center;">价格</th>
					<!--<th style="text-align:center;">折扣比例</th>-->
					<th style="text-align:center;">状态</th>
					<th style="text-align:center;">操作</th>
		        </tr>
		      </thead>
		      <tbody>
		      	<?php if($getData){foreach($getData AS $key=>$val){ ?>
		        <tr> 
		            <td style="text-align:center;vertical-align:middle;"><?=$val['project_id']?></td>
		            <td style="text-align:center;vertical-align:middle;"><?=$val['project_name']?></td>
		            <td style="text-align:center;vertical-align:middle;"><img src="<?=$val['cover_img']?>" style="width: 50px;height: 50px;" alt=""></td>
		            <td style="text-align:center;vertical-align:middle;width: 150px"><?=$val['project_desc']?$val['project_desc']:'暂无'?></td>
					<td style="text-align:center;vertical-align:middle;"><span style="color: <?=$val['score_type']==1?'':($val['score_type']==2?'#71E2FA':($val['score_type']==3?'orange':'blue'))?>"><?=$type[$val['score_type']]?></span></td>
					<td style="text-align:center;vertical-align:middle;"><?=$val['project_price']?></td>
					<!--<td style="text-align:center;vertical-align:middle;"><?=$val['rebate']?></td>-->
					<td style="text-align:center;vertical-align:middle;"><?=$val['project_status']==1?'<span class="label label-warning">上架中</span>':'<span class="label label-info">已下架</span>'?></td>
					<td style="text-align:center;vertical-align:middle;">
						<a class="ifrm btn btn-info" href="javascript:void(0)" data-url="/project/addPro" style="padding: 0px 4px;" data-width="820" data-height="650" data-title="修改信息" data-params="project_id/<?=$val['project_id']?>"><i class="icon-pencil"></i></a>&nbsp;&nbsp;
						<a style="padding: 0px 4px;" class="decate btn btn-danger" href="/project/delPro?project_id=<?=$val['project_id']?>" title="删除套餐"><i class="icon-remove"></i></a>
					</td>
		        </tr>
		        <?php }}else{?>
		        	<tr><td style="text-align:center" colspan=16>暂无数据</td></tr>
		        <?php }?>
		      </tbody>
		   </table>
		   <span style="float:right;margin-top:-44px"><?=$page?></span>
	</div>
</div>
<script>
$(function(){
	$('.decate').click(function(){
		if(!window.confirm('确认'+$(this).attr('title')+'吗 ?')){
			return false;
		}
		window.location = $(this).attr('href');
	});
})
</script>

